﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Processor.aspx.cs" Inherits="PaypalConverterSite.Processor" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder" runat="server">
   <link href="../main.css" rel="stylesheet" type="text/css" />
    <script type='text/javascript'>
        function LoadWizard(showWizard) {
            document.getElementById('tblPayPal').style.display = 'none';
            document.getElementById('tblCategories').style.display = 'none';
            document.getElementById('tblOptions').style.display = 'none';
            document.getElementById(showWizard).style.display = '';
            if (showWizard == 'tblOptions')
                document.getElementById('container').style.width = '100%';

        }
    </script>

    <script type="text/javascript">
        var xPos, yPos;
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        var pnl = '<%=pnlPaypal.ClientID%>';
        prm.add_beginRequest(BeginRequestHandler);
        prm.add_endRequest(EndRequestHandler);
        function BeginRequestHandler(sender, args) {
            xPos = $get(pnl).scrollLeft;
            yPos = $get(pnl).scrollTop;
        }
        function EndRequestHandler(sender, args) {
            $get(pnl).scrollLeft = xPos;
            $get(pnl).scrollTop = yPos;
        }
    </script>

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:Label ID="lblError" runat="server" Visible="false" CssClass="errorLabel">
                     Error occured in the application, Please verify the input files</asp:Label>
    <table class="wizardBoby" id="tblPayPal">
        <tr>
            <td class="wizardHeader">
                <asp:Label ID="lblPayPalHeader" runat="server">
                     Paypal History File</asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server">
                     Please upload your Paypal History File and Click Next</asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:FileUpload runat="server" ID="fupPaypal" Width="100%" />
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
        <tr class="wizardNavigationRow">
            <td>
                <asp:Button ID="btnLoad" runat="server" CssClass="button" OnClick="PaypalNext_Click"
                    Text="Next" CommandName="MoveNext" />
            </td>
        </tr>
        <tr>
            <td>
                <div style="height: 290px">
                </div>
            </td>
        </tr>
    </table>
    <table class="wizardBoby" id="tblCategories">
        <tr>
            <td class="wizardHeader">
                <asp:Label ID="lblCategoriesHead" runat="server">
                    Chart of Account File</asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblCategoriesMsg" runat="server">
                     Please select your Chart of Account File and Click Next</asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:FileUpload runat="server" ID="fupCategories" Width="100%" />
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
        <tr class="wizardNavigationRow">
            <td>
                <asp:Button ID="BtnCatPre" runat="server" CssClass="button" Text="Previous" OnClick="GotoPaypal_Click"
                    CommandName="MovePrevious" />
                <asp:Button ID="btnCatNext" runat="server" CssClass="button" OnClick="CategoriesNext_Click"
                    Text="Next" CommandName="MoveNext" />
            </td>
        </tr>
        <tr>
            <td>
                <div style="height: 290px">
                </div>
            </td>
        </tr>
    </table>
    <table class="wizardBoby" id="tblOptions">
        <tr>
            <td>
                <asp:UpdateProgress runat="server" ID="PageUpdateProgress" AssociatedUpdatePanelID="pnlUpdate">
                    <ProgressTemplate>
                        <div id="divWait" class="WaitDiv">
                            <img src="Images/Loading.gif" alt="Please wait..." />
                            Loading...
                        </div>
                    </ProgressTemplate>
                </asp:UpdateProgress>
                <asp:UpdatePanel ID="pnlUpdate" runat="server">
                    <ContentTemplate>
                        <table width="100%">
                            <tr>
                                <td colspan="2" class="wizardHeader">
                                    <asp:Label ID="Label2" runat="server">
                     Options</asp:Label>
                                </td>
                            </tr>
                            <tr class="wizaedLabel">
                                <td>
                                    Search for
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlSearch" Width="100%" runat="server" AutoPostBack="True"
                                        OnSelectedIndexChanged="ddlSearch_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr class="wizaedLabel">
                                <td>
                                    Map to
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlMap" Width="100%" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr class="wizaedLabel">
                                <td>
                                    For
                                </td>
                                <td>
                                    <asp:TextBox ID="txtFor" Width="450px" runat="server" ReadOnly="true"></asp:TextBox>
                                </td>
                            </tr>
                            <tr class="wizaedLabel">
                                <td>
                                    Step By Step
                                </td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:CheckBox ID="chkStepBy" runat="server" />
                                            </td>
                                            <td>
                                            </td>
                                            <td class="wizaedLabel">
                                                Total Matches Remaining
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtRemaining" Width="30px" runat="server" ReadOnly="true"></asp:TextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr class="wizaedLabel">
                                <td colspan="2">
                                    <asp:Label ID="lblRepError" runat="server" Visible="false" CssClass="errorLabel">
                     Please fill in the replacement value.</asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Panel ID="pnlPaypal" runat="server" ScrollBars="Vertical" Height="410px" Width="100%"
                                        BorderWidth="1px" BorderColor="LightBlue" Visible="true">
                                        <asp:GridView ID="grvPaypal" runat="server" AutoGenerateColumns="False" AllowPaging="false"
                                            AllowSorting="false" Visible="true" ShowHeader="false" OnRowDataBound="grvPaypal_RowDataBound" Width="98%">
                                            <RowStyle BackColor="#FFFFFF" />
                                            <AlternatingRowStyle BackColor="#EFF3FB" />
                                            <Columns>
                                                <asp:BoundField DataField="Column1"></asp:BoundField>
                                                <asp:BoundField DataField="Column2"></asp:BoundField>
                                                <asp:BoundField DataField="Column3"></asp:BoundField>
                                                <asp:BoundField DataField="Column4"></asp:BoundField>
                                                <asp:BoundField DataField="Column5"></asp:BoundField>
                                                <asp:BoundField DataField="Column6"></asp:BoundField>
                                                <asp:BoundField DataField="Column7"></asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                    </asp:Panel>
                                </td>
                            </tr>
                            <tr class="wizardNavigationRow">
                                <td colspan="2">
                                    <asp:Button ID="PreviousButtonID" runat="server" CssClass="button" Text="Previous"
                                        OnClick="GotoCategories_Click" CommandName="MovePrevious" />
                                    <asp:Button ID="Button1" runat="server" CssClass="button" Text="Process" OnClick="Process_Click"
                                        CommandName="MoveNext" />
                                    <asp:Button ID="btnSave" runat="server" CssClass="button" Text="Save" CommandName="MoveNext"
                                        OnClick="Save_Click" />
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                    <Triggers>
                        <asp:PostBackTrigger ControlID="btnSave" />
                        <asp:PostBackTrigger ControlID="PreviousButtonID" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Content>
